package com.hxit.huaxiamelongarden.mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hxit.huaxiamelongarden.domin.po.Like;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
@Mapper
public interface LikeMapper extends BaseMapper<Like> {
     default List<Like> selectLikesByUserId(Integer userId){
          LambdaQueryWrapper<Like> queryWrapper = new LambdaQueryWrapper<>();
          queryWrapper.eq(Like::getUserId,userId);
          return selectList(queryWrapper);
     }
}
